Infinite Impulse Response (namespace IIR)


BiquadFilter: It provides support to implement an infinite impulse response filter
BiquadFilter(void)
bool CreateHighPass(double cutFreq_rads, double passBand_dB, double stopFreq_rads, double stopBand_dB)
bool CreateLowPass(double cutFreq_rads, double passBand_dB, double stopFreq_rads, double stopBand_dB)
~ BiquadFilter(void)

BiquadSection: H(z) = (b0 + b1 * z^-1 + b2 * z ^-2) / (1 + a1 * z^-1 + a2 * z ^-2) To compute the frequency response PolarBiquadSection p = biquadSection; p.GetMagnitud(freq); p.GetPoles(real1, imag1, real2, imag2);
BiquadSection()
BiquadSection(const IIR::BiquadSection& init)
BiquadSection(const IIR::PolarBiquadSection& init)
IIR::BiquadSection& operator =(const IIR::BiquadSection& init)
IIR::BiquadSection& operator =(const IIR::PolarBiquadSection& init)
inline double ComputeOutput(double x)
It returns y[n] given a value of x[n] w[n] = x[n] - a1*w[n-1] - a2*w[n-2] y[n] = b0*w[n] + b1*w[n-1] + b2*w[n-2]
void Clear()
void ComputeOutput(double* buffer, const int numSamples)
It modifies the samples in buffer, the operation is in place (that is the output is written in the same buffer)
void ComputeOutput16(char* buffer, const int numSamples)
It modifies 16 bits samples in the buffer, the operation is in place (that is the output is written in the same buffer)
void ComputeOutput16_2Channels(char* buffer, const int numSamples)
It modifies 16 bits in buffer, the operation is in place (that is the output is written in the same buffer) buffer has two channels, i.e., ch1, ch2, ch1, ch2, ch1, ch2 (numSamples is 3)
void ComputeOutput_2Channels(double& inout_ch1, double& inout_ch2)
void ComputeOutput_2Channels(double* buffer, const int numSamples)
It modifies the samples in buffer, the operation is in place (that is the output is written in the same buffer) buffer has two channels, i.e., ch1, ch2, ch1, ch2, ch1, ch2 (numSamples is 3)
void CreateLinkwitzRileyHighPass(double cutFreqHz, double samplingFreqHz)
void CreateLinkwitzRileyLowPass(double cutFreqHz, double samplingFreqHz)
void CreateShelvingHigh(double cutFreqHz, double samplingFreqHz, double gaindB, double Q, bool attenuate)
1000 < cutFreqHz < 15000 -21 < gaindB < 21 Recommended Q = 0.8 (0.5 < Q < 1.1) To prevent amplitude saturation use attenuate=true
void CreateShelvingLow(double cutFreqHz, double samplingFreqHz, double gaindB, double Q, bool attenuate)
29 < cutFreqHz < 151 -21 < gaindB < 21 Recommended Q = 0.75 (0.5 < Q < 0.9) To prevent amplitude saturation use attenuate=true
void ResetTaps()
~ BiquadSection()

BiquadsCascade
BiquadsCascade()
BiquadsCascade(const IIR::BiquadsCascade& init)
BiquadsCascade(const IIR::PolarBiquadsCascade& init)
IIR::BiquadSection& operator [ ](long index)
IIR::BiquadsCascade& operator =(const IIR::BiquadsCascade& init)
IIR::BiquadsCascade& operator =(const IIR::PolarBiquadsCascade& init)
bool SetSize(int numberBiquadSections)
const IIR::BiquadSection& operator [ ](long index)const
double ComputeOutput(double x)
It returns y[n] given a value of x[n]
int GetSize()
void ComputeOutput(double* buffer, const int numSamples)
It modifies the samples in buffer, the operation is in place (that is the output is written in the same buffer)
void ComputeOutput_2Channels(double* buffer, const int numSamples)
It modifies the samples in buffer, the operation is in place (that is the output is written in the same buffer) buffer has two channels, i.e., ch1, ch2, ch1, ch2, ch1, ch2 (numSamples is 3)
void Delete()
~ BiquadsCascade()

ButterworthFilter
ButterworthFilter()
~ ButterworthFilter()

ChebyshevFilter
ChebyshevFilter()
~ ChebyshevFilter()

DcRemover
DcRemover()
int ComputeOutput(int input)
~ DcRemover()

EllipticFilter
EllipticFilter()
~ EllipticFilter()

PolarBiquadSection: Andrew G. Deczky 1972 Eq. 10 k (z - zeroR * exp(j * zeroAngle)) (z - zeroR * exp(-j * zeroAngle) ) / (z - poleR *exp (j * poleAngle) ) (z - poleR *exp (-j * poleAngle) )
IIR::PolarBiquadSection& operator =(const IIR::BiquadSection& init)
IIR::PolarBiquadSection& operator =(const IIR::PolarBiquadSection& init)
PolarBiquadSection()
PolarBiquadSection(const IIR::BiquadSection& init)
PolarBiquadSection(const IIR::PolarBiquadSection& init)
double GetGroupDelay(double freq_rads)
double GetMagnitude(double freq_rads)
void Clear()
void GetPoles(double& out_reP1, double& out_imP1, double& out_reP2, double& out_imP2)
void GetZeros(double& out_reZ1, double& out_imZ1, double& out_reZ2, double& out_imZ2)
~ PolarBiquadSection()

PolarBiquadsCascade
IIR::PolarBiquadSection& operator [ ](long index)
IIR::PolarBiquadsCascade& operator =(const IIR::BiquadsCascade& init)
IIR::PolarBiquadsCascade& operator =(const IIR::PolarBiquadsCascade& init)
PolarBiquadsCascade()
PolarBiquadsCascade(const IIR::BiquadsCascade& init)
PolarBiquadsCascade(const IIR::PolarBiquadsCascade& init)
bool SetSize(int numberBiquadSections)
const IIR::PolarBiquadSection& operator [ ](long index)const
double GetGroupDelay(double freq_rads)
double GetMagnitude(double freq_rads)
int GetSize() const
void Delete()
void GetPoles(vector<complex<double>>& out_poles)
void GetZeros(vector<complex<double>>& out_zeros)
~ PolarBiquadsCascade()
© Copyright 2000-2021 selo. All Rights Reserved. Jul 22 2021.